package com.huipinche.service.impl;

import com.huipinche.dao.bean.Journey;
import com.huipinche.dao.impl.JourneyDaoimpl;
import com.huipinche.service.judgeJourneyService;

import java.util.List;

/**
 * @Auther: 徐锶达
 * @Date:
 * @Description:
 */
public class judgeJourneyServiceimpl implements judgeJourneyService {
    @Override
    public Journey judgeJourneyService(int id) {
        JourneyDaoimpl journeyDaoimpl = new JourneyDaoimpl();
        List<Journey> journey = journeyDaoimpl.seletJourneyAll(); // 获取所有订单

        for (Journey element : journey) {
            if(element.getId() == id) {
                element.setJourneyflag(1);
                return element;
            }
        }
        return null;
    }
}
